PHP new Self () and new Static (), Phpnewselfstaticclass A {public static function get_self () {Return to New self (), "Public stat" IC function get_static () {return new static ();}} Class B extends A {} echo Get_class (B::get_self ()); Aecho
Description of the fs. fstat method in node. js, node. jsfs. fstat
Method description:
Obtain the file information based on the file descriptor.
Syntax:
Copy codeThe Code is as follows:Fs. fstat (fd, [callback (err, stats)])
Because this method
The STAT system call series includes Fstat, Stat, and Lstat, all of which are used to return "related file state information", except that the source file is set differently. The first introduction is a very important type of struct, named struct
Fstat, stat, and lstat usage, fstatstatlstat
The stat System Call series include fstat, stat, and lstat, which are used to return "Related File status information". The difference between the three is that the source file setting method is different.
A unix File System is a hierarchical structure composed of directories and files. The file attribute refers to the file type (normal file or directory), file size, file owner, File Permission, And the last modification time of the file. The stat and
[Fstat/STAT/lstat System Call]Function Description:Obtain file-related information.Usage:# Include # Include # Include
Int Stat (const char * path, struct stat * BUF );Int fstat (INT filedes, struct stat * BUF );Int lstat (const char * path, struct
/*
* Fstat (Get file status from file descriptor)
* Correlation function Stat,lstat,chmod,chown,readlink,utime
* Table header File
* #include
* #include
* Define function
* int fstat (int fildes,struct stat *buf);
The * Function
Fstat, Lstat,stat;Header files: #include #include #include To define a function:(1) int stat (const char *file_name,struct stat *buf)Returns a structure of information related to this named file(2) int fstat (int fileds,struct stat *buf)Get
The functions of these three functions are consistent and are used to obtain file-related information, but apply to different file objects. For the pathname parameter given in the function, the STAT function returns the information structure
1. Dependent header Files#include #include #include 2. Function definition:By passing in the file path, the struct stat struct pointerint stat (const char *path, struct stat *buf);Gets the properties of the file with the file descriptor. This
NOTE: Reprint please indicate the source
The specific information for the function is as follows:
function to get file information
Header file
function form
int stat (const char *path, struct stat *buf);int fstat
#Fstat Read the information["Dev"]=> Int (16777220) ["Ino"]=> Int (66880002) ["Mode"]=> Int (33188) ["Nlink"]=> Int (1) ["UID"]=> Int (501) ["GID"]=> int (0) ["Rdev"]=> Int (0) //File Size (units: bytes)["Size"]=> Int (99) //Recent Open Time["Atime"]
Records conflicts between php5.4 and php-redis. recently, due to the ubuntu update source, some lib conflicts between the original new source and the local system Library, leading to abnormal display on the system desktop, php5.4.9 is installed,
Recently, the ubuntu source is updated, causing some lib conflicts between the original new source and the local system Library. as a result, the system desktop displays an exception. later, only the new version is installed, phpbench is installed,
Recently because of the update of the source of Ubuntu, causing the original Xinyuan and the Local system library some Lib conflict, causing the system desktop display exception, and then only reload, the new installation of php5.4.9, also installed
The previous section introduced the knowledge about System V shared memory. Now let's take a look at POSIX shared memory and functions.
Shared Memory is simply a real physical memory area. Some functions can be used to map this area to the address
Linux inter-process communication (IPC) programming practices (8) use of shared memory-POSIX shared memory (API)
1. Posix provides two methods to share memory areas between unrelated processes:
(1) memory ing file: open the function first, and then
PHP file Operations1 Get the file name:basename-returns the file name portion of the pathgive a string containing a full path to a file, this function returns the base file name. If the file name ends in suffix, then this part will be removed as
The stat System Call series include fstat, stat, and lstat, which are used to return "Related File status information". The difference between the three is that the source file setting method is different.
1
First, I would like to introduce a very
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.